﻿using System;
using System.ServiceModel;

namespace OCXS.OCXSServiceLibrary.OPCXMLDA10 {

    [MessageContract(
        WrapperName = "Subscribe", 
        WrapperNamespace = "http://opcfoundation.org/webservices/XMLDA/1.0/", 
        IsWrapped = true)]
    public class SubscribeRequest {

        [MessageBodyMember(Name = "Options", Order = 0)]
        public OCXS.OCXSServiceLibrary.OPCXMLDA10.RequestOptions Options;

        [MessageBodyMember(Name = "ItemList", Order = 1)]
        public OCXS.OCXSServiceLibrary.OPCXMLDA10.SubscribeRequestItemList ItemList;

        [MessageBodyMember(Name = "ReturnValuesOnReply", Order = 2)]
        public bool ReturnValuesOnReply;

        [MessageBodyMember(Name = "SubscriptionPingRate", Order = 3)]
        public int SubscriptionPingRate;

        public SubscribeRequest() {
        }

        public SubscribeRequest(OCXS.OCXSServiceLibrary.OPCXMLDA10.RequestOptions Options, OCXS.OCXSServiceLibrary.OPCXMLDA10.SubscribeRequestItemList ItemList, bool ReturnValuesOnReply, int SubscriptionPingRate) {
            this.Options = Options;
            this.ItemList = ItemList;
            this.ReturnValuesOnReply = ReturnValuesOnReply;
            this.SubscriptionPingRate = SubscriptionPingRate;
        }
    }
}
